home *** CD-ROM | disk | FTP | other *** search
/ Nothing but Tetris / Nothing but Tetris.iso / amiga / yactris / src / yactris.h < prev   
C/C++ Source or Header  |  1994-01-01  |  3KB  |  130 lines

  1. /*
  2.     YacTris v0.0
  3.     Copyright ⌐1993 Jonathan P. Springer
  4.  
  5.     This program is free software; you can redistribute it and/or modify
  6.     it under the terms of the GNU General Public License as published by
  7.     the Free Software Foundation; either version 1, or (at your option)
  8.     any later version.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19.     For more details see the files README and COPYING, which should have
  20.     been included in this distribution.
  21.  
  22.     The author can be reached during the school year at these E-Mail addresses:
  23.  
  24.     springjp@screech.alfred.edu        (Internet)
  25.     springjp@ceramics.bitnet        (Bitnet)
  26.  
  27.     And can be reached by paper mail year-round at the following address:
  28.  
  29.     Jonathan Springer
  30.     360 W. Main St.
  31.     Dallastown, PA    17313-2014
  32.     USA
  33.  
  34. */
  35.  
  36.  
  37. /*
  38. **
  39. **  springtris.h
  40. **
  41. **  Header File with Springtris information
  42. **
  43. **  Jonathan Springer
  44. **
  45. **  v 0.0
  46. **
  47. */
  48.  
  49. #include <exec/types.h>
  50. #include <graphics/gfx.h>
  51.  
  52. #define FHEIGHT 22
  53. #define FWIDTH 10
  54. #define STARTX 3
  55. #define STARTY 0
  56.  
  57.  
  58. struct ScreenInfo {
  59.     struct Screen *    s;
  60.     int         planes;
  61.     int         xTimes, yTimes;
  62.     int         WTop, WBot;
  63.     int         WLeft, WRight;
  64.     UWORD        pens[4];
  65.     struct TextAttr *    font;
  66.     APTR        vi;
  67.  
  68.     /*    Window Dimesions  */
  69.     int         WinWidth, WinHeight;
  70.  
  71.     /*    Playfield Dimensions  */
  72.     int         FieldInLeft, FieldInTop, FieldInWidth, FieldInHeight;
  73.  
  74.     /*    Nextpiece Dimensions  */
  75.     int         NextInLeft, NextInTop, NextInWidth, NextInHeight;
  76.     struct IntuiText *    NextText;
  77.  
  78.     /*    Where to blit the piece  */
  79.     int         NPTop, NPLeft;
  80.  
  81.     /*    Scores Dimensions  */
  82.     struct IntuiText *    ScoreTexts;
  83.     int         ScoreLeft, ScoreTop, ScoreWidth, ScoreHeight;
  84.  
  85.     /*    pWindow Information  */
  86.     int         pWidth, pHeight;
  87.     int         pxOffset, pyOffset;
  88.     int         pBMDown;
  89.     int         pxMult, pyMult;
  90.     struct IntuiText *    pIText;
  91. };
  92.  
  93. #define BACK    0
  94. #define SHINE    1
  95. #define SHADOW    2
  96. #define FILL    3
  97.  
  98. __unaligned struct MakeStruct {
  99.     int         command;
  100.     BYTE        xMult, xOffSet;
  101.     BYTE        yMult, yOffSet;
  102. };
  103.  
  104. /*  Commands  */
  105. #define STOP    0
  106. #define DRAW    1
  107. #define MOVE    2
  108. #define FLOOD    3
  109. #define PEN    4
  110.  
  111. struct PieceRot {
  112.     int         type;
  113.     struct PieceRot *    next;
  114.     struct BitMap    BitMap;
  115.     int         width, height;
  116.     UBYTE *        map;
  117.     struct MakeStruct * ms;
  118. };
  119.  
  120. /*  Piece types  */
  121. #define LINE        0
  122. #define BLOCK        1
  123. #define TEE        2
  124. #define ZIG        3
  125. #define ZAG        4
  126. #define ELL        5
  127. #define LEE        6
  128.  
  129. #define NUM_TYPES   7
  130.